﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using ComponentFactory.Krypton.Toolkit;

namespace ElevatorSIM
{
    public class ConsoleTextBoxListener:TraceListener
    {
        private KryptonRichTextBox consoleTextbox;
        public ConsoleTextBoxListener(KryptonRichTextBox _consoleTextbox)
        {
            consoleTextbox = _consoleTextbox;
        }
        public override void Write(string message)
        {
            consoleTextbox.AppendText(message);
        }
        public override void WriteLine(string message)
        {
            consoleTextbox.AppendText(message+"\n");
        }
    }
}
